package fojta;

public enum Directions {
	
	Up(0), Right(1), Down(2), Left(3);
	private byte id_;
	Directions(byte id ) { id_ = id;	}
	Directions(int id ) { id_ = (byte) id;	}
	public byte getId() { return id_; }
	/**
	 * Each resistor has 4 neighbors which is
	 * located in 4 directions ( Up, Down, Right, Left) 
	 * @author risa
	 *
	 */
	public Directions opposite() {
		switch (this) {
		case Up: return Directions.Down;
		case Down: return Directions.Up;
		case Right: return Directions.Left;
		case Left: return Directions.Right;
		}
		return Directions.Up;
	}
}
